package com.hzw.saas.web.app.rss.dto;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 文献元数据
 * @author sonam
 * @sine 2021/10/9 10:29 上午
 */
@Data
@ApiModel("文献元数据")
@Accessors(chain = true)
public class LibraryMetaDTO {

    @ApiModelProperty(value = "作者")
    private String author;

    @ApiModelProperty(value = "作者列表")
    private List<String> authors;

    @ApiModelProperty(value = "doi")
    private String doi;

    @ApiModelProperty(value = "摘要")
    private String description;

    @ApiModelProperty(value = "期刊名")
    private String journalName;

    @ApiModelProperty(value = "标题")
    private String title;

    @JsonFormat(pattern = DatePattern.NORM_DATE_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATE_PATTERN)
    @ApiModelProperty(value = "发表日期")
    private Date pubDate;

    @ApiModelProperty(value = "资源MD5")
    private String resourceMd5;

    @ApiModelProperty(value = "解析状态，-1-解析失败, 0-成功, 1-资源存在，2-资源不存在")
    private int state;
}
